package com.qf;

import com.qf.pojo.Person;
import com.qf.pojo.User;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * 启动类（引导类）
 *
 * 保护你的大熊
 * 2022/3/9
 * 10:25
 */
@SpringBootApplication
public class SpringBootHelloWord {

    public static void main(String[] args) {

//        SpringApplication.run(SpringBootHelloWord.class, args);
        ConfigurableApplicationContext ac = SpringApplication.run(SpringBootHelloWord.class, args);

//        Person person = ac.getBean(Person.class);
//        System.out.println(person);

        User user = ac.getBean(User.class);
        System.out.println(user);

    }

}
